import wepy from 'wepy';

const BASE_URL = 'https://www.zhengzhicheng.cn/';

export default fetch = (obj) => {
  return wepy.request({
    url: `${BASE_URL}${obj.url}`,
    data: obj.data || {},
    method: obj.method || 'GET',
    dataType: obj.dataType || 'json',
    header: obj.header || {}
  });
};
